package cc.javaee.bbs.model;

import lombok.Data;

import java.util.Date;

/*
 * 回复表
 * 
 */
@Data
public class Huifu {

    private Integer id;

    //帖子的id(话题ID)
    private Integer tieziid;

    //帖子的创建时间
    private Date createtime;

    //创建人id
    private Integer createuserid;

    //最后操作内容
    private String lastupdate;

    //是否删除
    private String isdel;

    //排序
    private Integer orderby;

    //html内容
    private String contenthtml;

    //纯文本内容
    private String contenttxt;


    private Integer huifuid;

    //点赞数量
    private Integer likeCount;

    //投票数量
    private Integer voteCount;

    //我的点赞状态
    private Integer voteStatus;

    //我的投票状态
    private Integer likeStatus;

    //1回复 2上传文件 3投票 4点赞
    private Integer type;

    //文件地址
    private String img;

    //姓名
    private String name;

    //用户图形
    private String userImg;

    public Integer getVoteStatus() {
        return voteStatus > 0 ? 1 : 0;
    }

    public Integer getLikeStatus() {
        return likeStatus > 0 ? 1 : 0;
    }
}